package com.yonyou.brigade.order_center.model;

import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author xuexmf@yonyou.com
 * @since 2018-09-07
 */
@TableName("bri_train_ticket")
public class BriTrainTicket extends Model<BriTrainTicket> implements Comparable<BriTrainTicket> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 证件号
     */
    @TableField("card_no")
    private String cardNo;
    /**
     * 证件号
     */
    @TableField("order_no")
    private String orderNo;
    /**
     * 车票车次ID
     */
    @TableField("ticket_info_id")
    private String ticketInfoId;
    /**
     * 车次
     */
    @TableField("train_code")
    private String trainCode;
    /**
     * 车次名称
     */
    @TableField("train_code_name")
    private String trainCodeName;
    /**
     * 车次类型
     */
    @TableField("ticket_type")
    private String ticketType;
    /**
     * 出发车站
     */
    @TableField("from_station")
    private String fromStation;
    /**
     * 到达车站
     */
    @TableField("to_station")
    private String toStation;
    /**
     * 出发日期
     */
    @TableField("train_date")
    private Date trainDate;
    /**
     * 出发时间
     */
    @TableField("from_time")
    private Date fromTime;
    /**
     * 到达日期
     */
    @TableField("to_date")
    private Date toDate;
    /**
     * 到达时间
     */
    @TableField("to_time")
    private Date toTime;
    /**
     * 座位类型
     */
    @TableField("seat_type")
    private String seatType;
    /**
     * 时长
     */
    @TableField("tun_time")
    private String tunTime;
    /**
     * 是否可退票
     */
    @TableField("is_allow_refund")
    private String isAllowRefund;
    /**
     * 退票退款
     */
    @TableField("refund_amount")
    private BigDecimal refundAmount;
    /**
     * 退票费
     */
    @TableField("tp_price")
    private BigDecimal tpPrice;
    /**
     * 12306订单号
     */
    @TableField("train_order_no")
    private String trainOrderNo;
    /**
     * 车厢
     */
    @TableField("train_box")
    private String trainBox;
    /**
     * 座位号
     */
    @TableField("seat_no")
    private String seatNo;
    /**
     * 票价
     */
    @TableField("tkt_price")
    private BigDecimal tktPrice;
    /**
     * 车票退票状态
     */
    @TableField("refund_ticket_status")
    private String refundTicketStatus;
    /**
     * 改签备注
     */
    @TableField("refund_mark")
    private String refundMark;
    /**
     * 改签状态
     */
    @TableField("change_status")
    private String changeStatus;
    /**
     * 服务费
     */
    @TableField("counter_fee")
    private BigDecimal counterFee;
    /**
     * 乘客改签变更费
     */
    @TableField("carrier_change_fee")
    private BigDecimal carrierChangeFee;
    /**
     * 送票费/快递费
     */
    @TableField("send_ticket_fee")
    private BigDecimal sendTicketFee;
    private Date ts;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getTicketInfoId() {
        return ticketInfoId;
    }

    public void setTicketInfoId(String ticketInfoId) {
        this.ticketInfoId = ticketInfoId;
    }

    public String getTrainCode() {
        return trainCode;
    }

    public void setTrainCode(String trainCode) {
        this.trainCode = trainCode;
    }

    public String getTrainCodeName() {
        return trainCodeName;
    }

    public void setTrainCodeName(String trainCodeName) {
        this.trainCodeName = trainCodeName;
    }

    public String getTicketType() {
        return ticketType;
    }

    public void setTicketType(String ticketType) {
        this.ticketType = ticketType;
    }

    public String getFromStation() {
        return fromStation;
    }

    public void setFromStation(String fromStation) {
        this.fromStation = fromStation;
    }

    public String getToStation() {
        return toStation;
    }

    public void setToStation(String toStation) {
        this.toStation = toStation;
    }

    public Date getTrainDate() {
        return trainDate;
    }

    public void setTrainDate(Date trainDate) {
        this.trainDate = trainDate;
    }

    public Date getFromTime() {
        return fromTime;
    }

    public void setFromTime(Date fromTime) {
        this.fromTime = fromTime;
    }

    public Date getToDate() {
        return toDate;
    }

    public void setToDate(Date toDate) {
        this.toDate = toDate;
    }

    public Date getToTime() {
        return toTime;
    }

    public void setToTime(Date toTime) {
        this.toTime = toTime;
    }

    public String getSeatType() {
        return seatType;
    }

    public void setSeatType(String seatType) {
        this.seatType = seatType;
    }

    public String getTunTime() {
        return tunTime;
    }

    public void setTunTime(String tunTime) {
        this.tunTime = tunTime;
    }

    public String getIsAllowRefund() {
        return isAllowRefund;
    }

    public void setIsAllowRefund(String isAllowRefund) {
        this.isAllowRefund = isAllowRefund;
    }

    public BigDecimal getRefundAmount() {
        return refundAmount;
    }

    public void setRefundAmount(BigDecimal refundAmount) {
        this.refundAmount = refundAmount;
    }

    public BigDecimal getTpPrice() {
        return tpPrice;
    }

    public void setTpPrice(BigDecimal tpPrice) {
        this.tpPrice = tpPrice;
    }

    public String getTrainOrderNo() {
        return trainOrderNo;
    }

    public void setTrainOrderNo(String trainOrderNo) {
        this.trainOrderNo = trainOrderNo;
    }

    public String getTrainBox() {
        return trainBox;
    }

    public void setTrainBox(String trainBox) {
        this.trainBox = trainBox;
    }

    public String getSeatNo() {
        return seatNo;
    }

    public void setSeatNo(String seatNo) {
        this.seatNo = seatNo;
    }

    public BigDecimal getTktPrice() {
        return tktPrice;
    }

    public void setTktPrice(BigDecimal tktPrice) {
        this.tktPrice = tktPrice;
    }

    public String getRefundTicketStatus() {
        return refundTicketStatus;
    }

    public void setRefundTicketStatus(String refundTicketStatus) {
        this.refundTicketStatus = refundTicketStatus;
    }

    public String getRefundMark() {
        return refundMark;
    }

    public void setRefundMark(String refundMark) {
        this.refundMark = refundMark;
    }

    public String getChangeStatus() {
        return changeStatus;
    }

    public void setChangeStatus(String changeStatus) {
        this.changeStatus = changeStatus;
    }

    public BigDecimal getCounterFee() {
        return counterFee;
    }

    public void setCounterFee(BigDecimal counterFee) {
        this.counterFee = counterFee;
    }

    public BigDecimal getCarrierChangeFee() {
        return carrierChangeFee;
    }

    public void setCarrierChangeFee(BigDecimal carrierChangeFee) {
        this.carrierChangeFee = carrierChangeFee;
    }

    public BigDecimal getSendTicketFee() {
        return sendTicketFee;
    }

    public void setSendTicketFee(BigDecimal sendTicketFee) {
        this.sendTicketFee = sendTicketFee;
    }

    public Date getTs() {
        return ts;
    }

    public void setTs(Date ts) {
        this.ts = ts;
    }

    public static final String ID = "id";

    public static final String CARD_NO = "card_no";

    public static final String ORDER_NO = "order_no";

    public static final String TICKET_INFO_ID = "ticket_info_id";

    public static final String TRAIN_CODE = "train_code";

    public static final String TRAIN_CODE_NAME = "train_code_name";

    public static final String TICKET_TYPE = "ticket_type";

    public static final String FROM_STATION = "from_station";

    public static final String TO_STATION = "to_station";

    public static final String TRAIN_DATE = "train_date";

    public static final String FROM_TIME = "from_time";

    public static final String TO_DATE = "to_date";

    public static final String TO_TIME = "to_time";

    public static final String SEAT_TYPE = "seat_type";

    public static final String TUN_TIME = "tun_time";

    public static final String IS_ALLOW_REFUND = "is_allow_refund";

    public static final String REFUND_AMOUNT = "refund_amount";

    public static final String TP_PRICE = "tp_price";

    public static final String TRAIN_ORDER_NO = "train_order_no";

    public static final String TRAIN_BOX = "train_box";

    public static final String SEAT_NO = "seat_no";

    public static final String TKT_PRICE = "tkt_price";

    public static final String REFUND_TICKET_STATUS = "refund_ticket_status";

    public static final String REFUND_MARK = "refund_mark";

    public static final String CHANGE_STATUS = "change_status";

    public static final String COUNTER_FEE = "counter_fee";

    public static final String CARRIER_CHANGE_FEE = "carrier_change_fee";

    public static final String SEND_TICKET_FEE = "send_ticket_fee";

    public static final String TS = "ts";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "BriTrainTicket{" +
                "id=" + id +
                ", cardNo=" + cardNo +
                ", orderNo=" + orderNo +
                ", ticketInfoId=" + ticketInfoId +
                ", trainCode=" + trainCode +
                ", trainCodeName=" + trainCodeName +
                ", ticketType=" + ticketType +
                ", fromStation=" + fromStation +
                ", toStation=" + toStation +
                ", trainDate=" + trainDate +
                ", fromTime=" + fromTime +
                ", toDate=" + toDate +
                ", toTime=" + toTime +
                ", seatType=" + seatType +
                ", tunTime=" + tunTime +
                ", isAllowRefund=" + isAllowRefund +
                ", refundAmount=" + refundAmount +
                ", tpPrice=" + tpPrice +
                ", trainOrderNo=" + trainOrderNo +
                ", trainBox=" + trainBox +
                ", seatNo=" + seatNo +
                ", tktPrice=" + tktPrice +
                ", refundTicketStatus=" + refundTicketStatus +
                ", refundMark=" + refundMark +
                ", changeStatus=" + changeStatus +
                ", counterFee=" + counterFee +
                ", carrierChangeFee=" + carrierChangeFee +
                ", sendTicketFee=" + sendTicketFee +
                ", ts=" + ts +
                "}";
    }

    @Override
    public int compareTo(BriTrainTicket briTrainTicket) {
        Date toDate = briTrainTicket.getToDate();
        Date toTime = briTrainTicket.getToTime();
        Date toDate1 = this.getToDate();
        Date toTime1 = this.getToTime();
        int i = toDate1.compareTo(toDate);
        if (0 == i) {
            i = toTime1.compareTo(toTime);
        }
        return i;
    }
}
